


<!DOCTYPE html >
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>雷谛科技</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('newstyle/css/drink.css') }}" />

</head>
<body>
<header id="header">
    <a href="{{ route('customers.index') }}">
        <img src="{{ URL::asset('newstyle/images/arrow_left.png') }}" alt="" width="8" class="arrow_left">
    </a>
    <h3>净水计划信息</h3>
</header>


                    @foreach($mounts as $mount)

<section id="section7">
    <ul>
        <li>
            <a href="">
                <img src="{{ $PATH }}{{ $mount->machine->cover }}-zheng" alt="" width="90" class="product1">
                <h4>型号:{{ $mount->machine->name }}</h4>
                <p class="machine_code" style="text-indent:1em;position:absolute; bottom:40px; left:96px;">机器编码：{{ $mount->code }}</p>
                <p style="position:absolute; bottom:10px; left:96px;"><img src="{{ URL::asset('newstyle/images/cleck.png') }}" alt="" width='11' align="absmiddle">初装日期：{{ substr($mount->created_at,0,-9) }}</p>
                <span class="radio" ><input type="radio" name="ch" value="{{ $mount->id }} "></span>
            </a>
        </li>
    </ul>
</section>
<section id="section8" class="cl">
    <ul>
        <li>
            <a href="">
                姓名<span>{{ $mount->mount_name }}</span>
            </a>
        </li>
        <li>
            <a href="">
                电话<span>{{ $mount->mount_mobile }}</span>
            </a>
        </li>
        <li>
            <a href="">
                地区<span>{{ $mount->address }}</span>
            </a>
        </li>
    </ul>
</section>

<div class="change cl" id="detail_{{ $mount->id }}"></div>
<div class="details">
        <p class="cur" id="{{ $mount->id }}">详细</p>
</div>


                    @endforeach



<div style="height:70px;"></div>





<footer class="footer cl">
    <ul>
        <li><a onclick="service('12');"  href="javascript:void(0)">我要售后</a></li>
        <li><a onclick="service('10');"  href="javascript:void(0)">我要签约</a></li>
        <li>
            我要服务
            <div class="menu">
                <ul>
                    <li>
                        <a onclick="service('tousu');" href="javascript:void(0)">我要投诉</a>
                    </li>
                    <li>
                        <a onclick="service('13');"  href="javascript:void(0)">我要换芯</a>
                    </li>
                    <li>
                        <a onclick="service('11');"  href="javascript:void(0)">我要拆机</a>
                    </li>
                </ul>
            </div>
        </li>
    </ul>
</footer>
<script src="{{ URL::asset('newstyle/js/jquery.js') }}"></script>
<script>
    $(function(){
        //
        $(".footer ul li:eq(2)").click(function(){
            $(this).find(".menu").toggle();
        })
        //
        $(".details p").click(function(){
            var id = $(this).attr('id');
            if($(this).hasClass("cur")){
                show(id);
                $(this).parent().prev().slideDown();
                $(this).removeClass("cur");
                $(this).text("收起")

            }else{
                $(this).parent().prev().slideUp();
                $(this).addClass("cur");
                $(this).text("详细");
            }
        })
    })
    function show(id){
        $.post("/customers/filters?id="+id,function(data){
            $('#detail_'+id).html(data);
        });
    }
    function service(type){
        var mount_id = $('input:radio[name=ch]:checked').val();
        mount_id = parseInt(mount_id);
        if(!isNaN(mount_id)){
             window.location.href="/mounts/"+mount_id+"/edit?type="+type;
        }
    }
</script>
</body>
</html>

